home *** CD-ROM | disk | FTP | other *** search
Wrap
global gObjects, gStates, void, gCursorlist, sQTCharSprite, gCDNotes, gMIDIPlayTRUE, gKeyRef on EnterF01 if voidp(getaProp(getaProp(gStates, #BeenThere), #F01)) then PDARelease("J05fores.mov") end if end on CalcTransToF63 Test if Test = #Debug then return [#F63A, #F63B] end if if getaProp(getaProp(gObjects, #Scanner), #solved) = #false then return #F63A else if getaProp(getaProp(gObjects, #Scanner), #solved) = #true then return #F63B end if end if end on goToEFork hideMapMap() genexitkf(#E06F) end on hideMapMap set OBj to getaProp(gObjects, #MapOBj) if getaProp(OBj, #State) = #map then DelObjects(getaProp(getaProp(OBj, #SpecialChild), #map)) MakeDynamic(#MapOBj, #State, #NoMAP) end if end on calcTransToF68 Test if Test = #Debug then return [#F68A, #F68B] end if if getaProp(getaProp(gObjects, #Scanner), #solved) = #false then return #F68A else if getaProp(getaProp(gObjects, #Scanner), #solved) = #true then return #F68B end if end if end on calcTransToF70 Test if Test = #Debug then return [#F70A, #F70B] end if if getaProp(getaProp(gObjects, #Scanner), #solved) = #false then return #F70A else if getaProp(getaProp(gObjects, #Scanner), #solved) = #true then return #F70B end if end if end on CalcTransToF73 Test if Test = #Debug then return [#F73A, #F73B, #F73C, #F73D] end if if getaProp(getaProp(gObjects, #Scanner), #solved) = #false then if getaProp(getaProp(gObjects, #SeedObj), #Aquired) = #false then return #F73A else return #F73D end if else if getaProp(getaProp(gObjects, #Scanner), #solved) = #true then if getaProp(getaProp(gObjects, #SeedObj), #Aquired) = #false then return #F73B else return #F73C end if end if end if end on DoDie Startthetimer(1, "goDeath") end on goDeath genexitkf(#FDie) end on DoF02ForwardNav if (getaProp(getaProp(gObjects, #F02ForwardNav), #timesAttempted) = 0) and ((getaProp(getaProp(gObjects, #BagObj), #Aquired) = #false) or (getaProp(getaProp(gObjects, #MapOBj), #Aquired) = #false)) then set timesAttempted to getaProp(getaProp(gObjects, #F02ForwardNav), #timesAttempted) set timesAttempted to timesAttempted + 1 MakeDynamic(#F02ForwardNav, #timesAttempted, timesAttempted) killFAmbientSound() playSound("F01rmap.aif", #keyframeFile) set soundSymbol to value("#" & "F01rmap.aif") set soundTicks to getaProp(getaProp(getaProp(gObjects, #F02ForwardNav), #VOTicks), soundSymbol) set soundTimer to Startthetimer(soundTicks + 30, "restartFAmbientSound", #F02ForwardNav) else genexitkf(#F65) end if end on exitF02 if not voidp(getaProp(getaProp(gObjects, #F02ForwardNav), #timer)) then DeletetheTimer(getAt(getaProp(getaProp(gObjects, #F02ForwardNav), #timer), 1)) end if end on doRangerBethVid2 set OBj to getaProp(gObjects, #RangerBeth) set the movieTime of sprite getaProp(OBj, #SpriteNum) to 0 set the movieRate of sprite getaProp(OBj, #SpriteNum) to 1 end on enterF04 set OBJref to #RangerBeth set OBj to getaProp(gObjects, OBJref) hideMapMap() initCDDancing() if getaProp(getaProp(gObjects, #Scanner), #solved) = #true then set thisPlayList to 6 MakeDynamic(#RangerBeth, #Condition, 6) MakeDynamic(#RangerBeth, #DisplayState, 6) MakeDynamic(#RangerBeth, #DisplayCount, #random) else if (getaProp(getaProp(gStates, #BeenThere), #F69) > 0) and (getaProp(getaProp(gObjects, #Scanner), #solved) = #false) then MakeDynamic(#RangerBeth, #Condition, 3) MakeDynamic(#RangerBeth, #DisplayState, 3) set thisPlayList to 3 set lastMoviePlayedIndex to getLastMoviePlayedIndex(OBJref) setLastMoviePlayedList(OBJref, lastMoviePlayedIndex + 1) else if (getaProp(getaProp(gStates, #BeenThere), #F65) > 0) and (getaProp(getaProp(gStates, #BeenThere), #F69) = 0) then MakeDynamic(#RangerBeth, #Condition, 2) MakeDynamic(#RangerBeth, #DisplayState, 2) set thisPlayList to 2 set lastMoviePlayedIndex to getLastMoviePlayedIndex(OBJref) setLastMoviePlayedList(OBJref, lastMoviePlayedIndex + 1) else if getaProp(getaProp(gStates, #BeenThere), #F65) = 0 then MakeDynamic(#RangerBeth, #Condition, 1) MakeDynamic(#RangerBeth, #DisplayState, 1) set thisPlayList to 1 set lastMoviePlayedIndex to getLastMoviePlayedIndex(OBJref) setLastMoviePlayedList(OBJref, lastMoviePlayedIndex + 1) end if end if end if end if end on initCDDancing set OBJref to #RangerBeth set OBj to getaProp(gObjects, OBJref) MakeDynamic(#RangerBeth, #TimesCDPlayed, 0) MakeDynamic(#RangerBeth, #Condition, 4) MakeDynamic(#RangerBeth, #DisplayState, 4) set newCDMovieIndex to 0 setLastMoviePlayedList(#RangerBeth, newCDMovieIndex) MakeDynamic(#RangerBeth, #Condition, 5) MakeDynamic(#RangerBeth, #DisplayState, 5) set newCDMovieIndex to 0 setLastMoviePlayedList(#RangerBeth, newCDMovieIndex) end on doRangerBethVid playType set OBJref to #RangerBeth set OBj to getaProp(gObjects, OBJref) if getaProp(OBj, #TimesCDPlayed) > 0 then if getaProp(OBj, #TimesCDPlayed) = 1 then MakeDynamic(#RangerBeth, #Condition, 4) MakeDynamic(#RangerBeth, #DisplayState, 4) if getLastMoviePlayedIndex(#RangerBeth) = 0 then setLastMoviePlayedList(#RangerBeth, 0) end if DoCharacterMovie(#RangerBeth) set newIndex to getaProp(OBj, #ConCount) setLastMoviePlayedList(#RangerBeth, newIndex) else if getaProp(OBj, #TimesCDPlayed) > 1 then MakeDynamic(#RangerBeth, #Condition, 5) MakeDynamic(#RangerBeth, #DisplayState, 5) if playType = #CDPlay then set newIndex to 0 setLastMoviePlayedList(#RangerBeth, 0) end if if getLastMoviePlayedIndex(#RangerBeth) = 0 then setLastMoviePlayedList(#RangerBeth, 0) end if DoCharacterMovie(#RangerBeth) set newIndex to getaProp(OBj, #ConCount) setLastMoviePlayedList(#RangerBeth, newIndex) end if end if else if (getaProp(OBj, #Condition) <> 4) or (getaProp(OBj, #Condition) <> 5) then DoCharacterMovie(#RangerBeth) set newIndex to getaProp(OBj, #ConCount) setLastMoviePlayedList(#RangerBeth, newIndex) end if end if end on getLastMoviePlayedIndex OBJref set OBj to getaProp(gObjects, OBJref) set lastMoviesPlayedList to getaProp(OBj, #lastMoviesPlayed) set lastPlayListNum to getaProp(OBj, #Condition) set lastMoviePlayedIndex to getaProp(lastMoviesPlayedList, lastPlayListNum) return lastMoviePlayedIndex end on setLastMoviePlayedList OBJref, index set OBj to getaProp(gObjects, OBJref) MakeDynamic(OBJref, #ConCount, index) set lastMoviesPlayedList to getaProp(OBj, #lastMoviesPlayed) set lastPlayListNum to getaProp(OBj, #Condition) set lastPlayList to getaProp(getaProp(OBj, #cast), lastPlayListNum) set totalMovieCount to count(lastPlayList) if index < totalMovieCount then setaProp(lastMoviesPlayedList, lastPlayListNum, index) MakeDynamic(OBJref, #ConCount, index) MakeDynamic(OBJref, #DisplayCount, index) else setaProp(lastMoviesPlayedList, lastPlayListNum, totalMovieCount) MakeDynamic(OBJref, #ConCount, totalMovieCount) MakeDynamic(OBJref, #DisplayCount, totalMovieCount) end if MakeDynamic(OBJref, #lastMoviesPlayed, lastMoviesPlayedList) end on setCDPlays inNumberPlays MakeDynamic(#RangerBeth, #TimesCDPlayed, inNumberPlays) end on enterF67A hideMapMap() set OBj to getaProp(gObjects, #Fenrsley67) setaProp(OBj, #ConCount, 1) MakeDynamic(#Fenrsley67, #ConCount, 1) if getaProp(getaProp(gObjects, #scanpapers), #State) = #on then MakeDynamic(#Fenrsley67, #Condition, 4) MakeDynamic(#Fenrsley67, #DisplayState, 4) MakeDynamic(#Fenrsley67NavRectParent, #State, #NavOn) else if (getaProp(getaProp(gObjects, #scanpapers), #State) = #off) and (getaProp(getaProp(gStates, #BeenThere), #F67A) > 2) then MakeDynamic(#Fenrsley67, #Condition, 2) MakeDynamic(#Fenrsley67, #DisplayState, 2) else if (getaProp(getaProp(gObjects, #scanpapers), #State) = #off) and (getaProp(getaProp(gStates, #BeenThere), #F67A) = 2) then MakeDynamic(#Fenrsley67, #Condition, 3) MakeDynamic(#Fenrsley67, #DisplayState, 3) else if (getaProp(getaProp(gObjects, #scanpapers), #State) = #off) and (getaProp(getaProp(gStates, #BeenThere), #F67A) = 1) then MakeDynamic(#Fenrsley67, #Condition, 2) MakeDynamic(#Fenrsley67, #DisplayState, 2) else if (getaProp(getaProp(gObjects, #scanpapers), #State) = #off) and (getaProp(getaProp(gStates, #BeenThere), #F67A) = 0) then MakeDynamic(#Fenrsley67, #Condition, 1) MakeDynamic(#Fenrsley67, #DisplayState, 1) end if end if end if end if end if end on doFenrsley67Vid set OBj to getaProp(gObjects, #Fenrsley67) DoCharacterMovie(#Fenrsley67) end on enterF68A hideMapMap() set OBj to getaProp(gObjects, #Fenrsley68) MakeDynamic(#Fenrsley68, #ConCount, 1) MakeDynamic(#Fenrsley68, #DisplayCount, 1) if (getaProp(getaProp(gObjects, #Scanner), #solved) = #false) and (getaProp(getaProp(gStates, #BeenThere), #F73A) >= 1) then MakeDynamic(#Fenrsley68, #Condition, 3) MakeDynamic(#Fenrsley68, #DisplayState, 3) else if (getaProp(getaProp(gObjects, #Scanner), #solved) = #false) and (getaProp(getaProp(gStates, #BeenThere), #F69) > 1) then MakeDynamic(#Fenrsley68, #Condition, 2) MakeDynamic(#Fenrsley68, #DisplayState, 2) MakeDynamic(#Fenrsley68, #ConCount, 2) MakeDynamic(#Fenrsley68, #DisplayCount, 2) else if (getaProp(getaProp(gObjects, #Scanner), #solved) = #false) and (getaProp(getaProp(gStates, #BeenThere), #F69) = 1) then MakeDynamic(#Fenrsley68, #Condition, 2) MakeDynamic(#Fenrsley68, #DisplayState, 2) else if getaProp(getaProp(gStates, #BeenThere), #F68A) >= 0 then MakeDynamic(#Fenrsley68, #Condition, 1) MakeDynamic(#Fenrsley68, #DisplayState, 1) end if end if end if end if end on enterF68B hideMapMap() set OBj to getaProp(gObjects, #Fernsley68) MakeDynamic(#Fenrsley68, #ConCount, 1) MakeDynamic(#Fenrsley68, #DisplayCount, 1) if getaProp(getaProp(gStates, #BeenThere), #F68B) >= 1 then MakeDynamic(#Fenrsley68, #Condition, 5) MakeDynamic(#Fenrsley68, #DisplayState, 5) else MakeDynamic(#Fenrsley68, #Condition, 4) MakeDynamic(#Fenrsley68, #DisplayState, 4) end if end on enterF71A if (getaProp(getaProp(gStates, #BeenThere), #F71A) = 0) and (getaProp(getaProp(gStates, #BeenThere), #F71B) = 0) then PDARelease("J04m22p.mov") else if (getaProp(getaProp(gStates, #BeenThere), #F71A) = 1) or (getaProp(getaProp(gStates, #BeenThere), #F71B) = 1) then PDARelease("J04m23p.mov") end if end if end on enterF71B if (getaProp(getaProp(gStates, #BeenThere), #F71A) = 0) and (getaProp(getaProp(gStates, #BeenThere), #F71B) = 0) then PDARelease("J04m22p.mov") else if (getaProp(getaProp(gStates, #BeenThere), #F71A) = 1) or (getaProp(getaProp(gStates, #BeenThere), #F71B) = 1) then PDARelease("J04m23p.mov") end if end if end on doFenrsley68Vid DoCharacterMovie(#Fenrsley68) end on jk67 Jumptokey(#F67A) end on jk68a Jumptokey(#F68A) end on jk68b Jumptokey(#F68B) end on AddMaptoUnv set OBj to getaProp(gObjects, #MapHotrect) playSound("Click.aif", #keyframeCast) AddObjects([#MapOBj]) MakeDynamic(#MapOBj, #Aquired, #true) MakeDynamic(#MapHotrect, #Hotrect, [rect(0, 0, 0, 0)]) set hotrectnum to integer(getaProp(OBj, #SpriteNum) & "01") deleteProp(gHotRects, hotrectnum) end on AddLittertoUnv set OBj to getaProp(gObjects, #LitterHotrect) playSound("Click.aif", #keyframeCast) AddObjects([#BagObj]) MakeDynamic(#BagObj, #Aquired, #true) MakeDynamic(#LitterHotrect, #Hotrect, [rect(0, 0, 0, 0)]) set hotrectnum to integer(getaProp(OBj, #SpriteNum) & "01") deleteProp(gHotRects, hotrectnum) end on AddSeedtoUnvB playSound("Click.aif", #keyframeCast) AddObjects([#SeedObj]) MakeDynamic(#SeedObj, #Aquired, #true) Jumptokey(#F73C) end on AddSeedtoUnvA playSound("Click.aif", #keyframeCast) AddObjects([#SeedObj]) MakeDynamic(#SeedObj, #Aquired, #true) Jumptokey(#F73D) end on PaperFind OBJref set OBj to getaProp(gObjects, OBJref) set Papers to getaProp(gObjects, #scanpapers) if getaProp(getaProp(gObjects, #BagObj), #Aquired) = #true then set papersFound to getaProp(Papers, #Children) add(papersFound, getaProp(OBj, #pageNum)) MakeDynamic(#scanpapers, #Children, papersFound) if not voidp(getaProp(getaProp(OBj, #sound), #down)) then playSound(getaProp(getaProp(OBj, #sound), #down), #keyframeCast) end if if count(getaProp(Papers, #Children)) = 16 then MakeDynamic(#scanpapers, #State, #on) else MakeDynamic(#scanpapers, #State, #off) end if MakeDynamic(OBJref, #Hotrect, [rect(0, 0, 0, 0)]) MakeDynamic(OBJref, #DisplayState, #false) set hotrectnum to integer(getaProp(OBj, #SpriteNum) & "01") deleteProp(gHotRects, hotrectnum) set the loc of sprite getaProp(OBj, #SpriteNum) to point(-2000, -2000) end if end